package com.example.strategy;

import java.util.HashMap;
import java.util.Map;

/**
 * @version 1.0.0
 * @className: MedalServicesFactory
 * @description:
 * @author: rosszhang
 * @date: 2022/5/16 17:09
 */
public class MedalServicesFactory {
    private static final Map<String, IMedalService> map=new HashMap<>();
    static {
        map.put("guard", new GuardMedalServiceImpl());
        map.put("vip", new VipMedalServiceImpl());
        map.put("guest", new GuestMedalServiceImpl());
    }


    public static IMedalService getMedalService(String medalType){
        return map.get(medalType);
    }
}
